---
sidebar_class_name: hidden
---

# XML Agent

:::caution
This is a legacy chain, it is not recommended for use. Instead, see docs for the [LCEL version](/docs/modules/agents/agent_types/xml).
:::

Some language models (like Anthropic's Claude) are particularly good at reasoning/writing XML.
The below example shows how to use an agent that uses XML when prompting.

import CodeBlock from "@theme/CodeBlock";
import XMLExample from "@examples/agents/xml.ts";

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/anthropic
```

<CodeBlock language="typescript">{XMLExample}</CodeBlock>
